package com.sinodata.bsm.center.bean;

import com.sinodata.bsm.center.cache.DataTypeCache;
import com.sinodata.bsm.center.util.spring.SpringContextHolder;
import com.sinodata.bsm.common.vo.DataType;

/**
 * <p>
 * Description: 
 * </p>
 *
 * @author liulibo
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-6-28 上午11:26:26          liulibo        1.0         To create
 * </p>
 *
 * @since 
 * @see     
 */
public class DataTypeBean {

    private static DataTypeCache dataTypeCache = SpringContextHolder.getBean(DataTypeCache.class);

    private DataType vo;

    private DataTypeBean() {

    }

    private DataTypeBean(DataType vo) {
        this.vo = vo;
    }

    public static DataTypeBean get(Long id) {
        return new DataTypeBean(dataTypeCache.get(id));
    }

    public DataType dataType() {
        return this.vo;
    }

}